define([
    'jquery',
    'underscore',
    'backbone'
], function(
    $,
    _,
    Backbone
){

    return Backbone.View.extend({
        handle: function(link) {
            var shorten_url = '';

            $.ajax({
                type: 'POST',
                url: 'http://img.vemic.com/j/shorten',
                async: false,
                data: {
                    url: link
                },
                success: function(data) {
                    if (data != '' && data != null) {
                        shorten_url = data['shorten'];
                    }
                }
            });

            return shorten_url;
        }
    });

});
